function add(){
	var system = $("#system").val();
	var version = $("#version").val();
	var updatetime = $("#updatetime").val();
	if(system ==""){
		alert("系统为空");
		return;
	}
	if(version ==""){
		alert("版本为空");
		return;
	}
	if(updatetime ==""){
		alert("更新日期为空");
		return;
	}
	
	
	var list = $("#form").serialize();
	var type = $(".select_down").val();
	$.ajax({
		url:contextPath + "productioninfo/add",
		type:'post',
		data:{data:list},
		success:function(data){
			if(data==1){
			alert("添加成功");
			setTimeout(location.href=contextPath+"admin/web/production/productionlist.jsp?protype="+type,1000);
			}
			else{
				alert("添加失败");
			}
			
		}
		
	});
	
	
}


function update(){
	var system = $("#system").val();
	var version = $("#version").val();
	var updatetime = $("#updatetime").val();
	if(system ==""){
		alert("系统为空");
		return;
	}
	if(version ==""){
		alert("版本为空");
		return;
	}
	if(updatetime ==""){
		alert("更新日期为空");
		return;
	}
	
	
	var list = $("#form").serialize();
	var type = $(".select_down").val();
	$.ajax({
		url:contextPath + "productioninfo/update",
		type:'post',
		data:{data:list},
		success:function(data){
			if(data==1){
			alert("修改成功");
			setTimeout(location.href=contextPath+"admin/web/production/productionlist.jsp?protype="+type,1000);
			}
			else{
				alert("修改失败");
			}
			
		}
		
	});
	
	
}